package com.tedu.egweibo.pojo.dto;

import com.sun.istack.internal.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.boot.convert.DataSizeUnit;
import javax.validation.constraints.*;
@Data
public class UserRegDTO {
//    @Pattern(regexp = "^[\u4e00-\u9fa5A-Za-z0-9]{1,30}$")
    @NotNull
    @Pattern(regexp = "[\\u4e00-\\u9fa5]|[A-Za-z0-9]{1,30}")
    @ApiModelProperty(value="用户名",required = true,example = "张三")
    private String username;
    @NotNull
    @Pattern(regexp = "^[A-Za-z0-9_]{6,30}$")
    @ApiModelProperty(value="密码",required = true,example = "123456")
    private String password;
//    @Pattern(regexp = "^[\u4e00-\u9fa5A-Za-z0-9]{1,30}$")
    @NotNull
    @Pattern(regexp = "[\\u4e00-\\u9fa5]|[A-Za-z0-9]{1,30}")
    @ApiModelProperty(value="昵称",required = true,example = "阿三")
    private String nickname;
}
